﻿using System;
using System.Data;
using System.Runtime.Serialization;
using System.ServiceModel;

namespace HRMService
{
    [ServiceContract(Namespace = "http://HRMService")]
    public interface IInterestRate
    {
        [OperationContract]
        int InterestRate_Using(int InterestRateID);

        [OperationContract]
        DataSet InterestRate_GetAll();

        [OperationContract]
        DataSet InterestRate_GetMaxInterest();

        [OperationContract]
        InterestRateInfo InterestRate_GetInfo(int InterestRateID);

        [OperationContract]
        DataSet InterestRate_GetList(out int ItemCount, int currentPage, int pageSize);

        [OperationContract]
        int InterestRate_Insert(InterestRateInfo eInfo);

        [OperationContract]
        bool InterestRate_Update(InterestRateInfo eInfo);

        [OperationContract]
        bool InterestRate_Delete(int InterestRateID);
    }
    [DataContract(Namespace = "http://HRMService")]
    public class InterestRateInfo
    {
        int _ID;
        [DataMember]
        public int ID
        {
            get { return _ID; }
            set { _ID = value; }
        }

        String _Code;
        [DataMember]
        public String Code
        {
            get { return _Code; }
            set { _Code = value; }
        }

        DateTime _FromDate;
        [DataMember]
        public DateTime FromDate
        {
            get { return _FromDate; }
            set { _FromDate = value; }
        }

        DateTime _ToDate;
        [DataMember]
        public DateTime ToDate
        {
            get { return _ToDate; }
            set { _ToDate = value; }
        }

        decimal _Percent;
        [DataMember]
        public decimal Percent
        {
            get { return _Percent; }
            set { _Percent = value; }
        }

        string _Description;
        [DataMember]
        public string Description
        {
            get { return _Description; }
            set { _Description = value; }
        }
    }

}
